package kioscodeal


import grails.plugin.mail.MailService;
import grails.test.GrailsUnitTestCase
import grails.test.mixin.TestMixin
import grails.test.mixin.support.GrailsUnitTestMixin
import spock.lang.Specification

/**
 * See the API for {@link grails.test.mixin.support.GrailsUnitTestMixin} for usage instructions
 */
@TestMixin(GrailsUnitTestMixin)

class MyServiceTests extends GrailsUnitTestCase {
	
		EmailService myService
	
		void setUp() {
			 // Do not forget to call super method at first.
			super.setUp()
	
			// Initialize the my service.
			userService = new EmailService()
			// Initialize the mail service and
			// connect it to my service
			userService.mailService = new MailService()
		}
	
	   void "Envio email a usuario"() {
		
		when:"Envio mail"
		EmailService email = new EmailService()
		email.enviarMailConfirmacion()

		then:"Confirmo"
		println "Envio del mail"

				
    }
	
}
